include $(ERP_BASE_PATH)/comm/makefile.comm.v2

INSTALL_PATH = /usr/local/c2csvc/update
INCLUDE = -I../include \
		  -I../src \
		  -I../XXO \
		  -I$(INC_AUCTION_PATH) \
		  -I../../giserpdao/XXO \
		  -I../../giserpdao/include \
		  -I../../../export_include \
		  -I$(ERP_BASE_PATH)/comm/export_include/ \
		  -I$(ERP_BASE_PATH)/comm/export_include/c2cplatform \
		  -I$(ERP_BASE_PATH)/comm/export_include/app_platform \
		  -I$(ERP_BASE_PATH)/comm/export_include/tlib \
		  -I$(ERP_BASE_PATH)/comm/export_include/libc2c \
		  		  

	  
LIB = -L$(ERP_BASE_PATH)/comm/$(LIB_PATH) \
        $(LOG2_LIB) $(ITIL_LIB) \

OUTPUT = ao_gis_manage.so

VPATH = ../lib

SOURCES = gismanageao_adaptor.cpp \
		gismanageao.cpp 
OBJECTS=$(SOURCES:.cpp=.o)

all:$(OUTPUT) 

.SUFFIXES: .o .cpp
.cpp.o:
	$(CXX) $(CPPFLAGS) $(INCLUDE) -c $(filter %.cpp, $^) 

.o:
	$(CXX) $(CPPFLAGS) $(INCLUDE) -o $@ $^ 

$(OUTPUT): $(OBJECTS)
	$(CXX) $(CFLAGS) -fPIC -shared -o $@ $^ $(LIB)

clean:
	rm -f *.o *.so *.~ *.bak

install:
	cp -f $(OUTPUT) $(INSTALL_PATH)

installrpm:
	sudo cp -vf $(OUTPUT) /data/rpm_data_64bit/icson/icson_ao_gis_manage_1/build_directory/usr/local/c2csvc/so/
	
dep:
	mkdep -p$(VPATH) $(INCLUDE) $(SOURCES) > .depend

ifneq ($(wildcard .depend),)
include .depend
endif
